package com.example.arffrecorder.graphics;

import java.util.ArrayList;

import actclient.ClassLabel;
import actclient.UserRole;
import android.os.Parcel;
import android.os.Parcelable;

public class UserAction implements Parcelable{
	public String userId;
	public ArrayList<ClassLabel>activities;
	public ArrayList<Long>updateTimes;
	public UserRole role;
	
	public UserAction(){
		this.activities = new ArrayList<ClassLabel>();
		this.updateTimes = new ArrayList<Long>();
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public ArrayList<ClassLabel> getActivities() {
		return activities;
	}

	public void setActivities(ArrayList<ClassLabel> activities) {
		this.activities = activities;
	}

	public ArrayList<Long> getUpdateTimes() {
		return updateTimes;
	}

	public void setUpdateTimes(ArrayList<Long> updateTimes) {
		this.updateTimes = updateTimes;
	}

	public UserRole getRole() {
		return role;
	}

	public void setRole(UserRole role) {
		this.role = role;
	}
	public UserAction(Parcel in){
        String[] data = new String[2];

        in.readStringArray(data);
        
        this.userId = data[0];
        this.role = UserRole.valueOf(data[1]);
    }
	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int arg1) {
		// TODO Auto-generated method stub
		 dest.writeStringArray(new String[] {this.userId,
                 this.role.toString()});
		
	}
	
}
